<?php
function query($sql)
{
    $connection = mysql_connect('localhost', 'root', '');
    mysql_select_db("demo", $connection);
    $dulieu = mysql_query($sql);
    $data = array();
    while($row = mysql_fetch_assoc($dulieu)){
        $data[] = $row;
    }
    return $data;
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

